package com.chinaedu.oc.serv.commondity.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.chinaedu.oc.dao.commondity.ICommodityProductDao;
import com.chinaedu.oc.po.commodity.Commodity;
import com.chinaedu.oc.serv.commondity.ICommodityProductServ;

@Service
public class CommodityProductServImpl implements ICommodityProductServ {

	@Autowired
	private ICommodityProductDao commodityProductDao;

	/**
	 * 同步产品到商品中
	 */
	@Override
	public void insert(Commodity commodity) {
		// TODO Auto-generated method stub
		commodityProductDao.insert(commodity.getCommodityProduct());
	}

	@Override
	public void update(Commodity commodity) {
		// TODO Auto-generated method stub
		commodityProductDao.update(commodity.getCommodityProduct());
	}

}
